package ru.cod.rs.objects;

import android.graphics.Bitmap;
import android.graphics.Canvas;

/**
 * Static object with coordinates and Image
 * 
 * @author Suslov Vadim
 * 
 */
public class StateObject {

	protected Bitmap image;

	protected int x, y;
	protected int width, height;

	public StateObject() {

	};

	public StateObject(int x, int y) {
		this.x = x;
		this.y = y;
	}

	// //////////////////////////////////////

	public void draw(Canvas c) {
		c.drawBitmap(image, x, y, null);
	}

	// //////////////////////////////////////

	/**
	 * @return the image
	 */
	public Bitmap getImage() {
		return image;
	}

	/**
	 * @param image
	 *            the image to set
	 */
	public void setImage(Bitmap image) {
		this.image = image;
		this.width = image.getWidth();
		this.height = image.getHeight();

	}

	/**
	 * @return the x
	 */
	public int getX() {
		return x;
	}

	/**
	 * @param x
	 *            the x to set
	 */
	public void setX(int x) {
		this.x = x;
	}

	/**
	 * @return the y
	 */
	public int getY() {
		return y;
	}

	/**
	 * @param y
	 *            the y to set
	 */
	public void setY(int y) {
		this.y = y;
	}

	/**
	 * @return the width
	 */
	public int getWidth() {
		return width;
	}

	/**
	 * @return the height
	 */
	public int getHeight() {
		return height;
	}

}
